<?php
use think\facade\Route;

Route::miss(function() {
    return '404 Not Found!';
});

// +----------------------------------------------
// |                     登录路由                 |
// +----------------------------------------------
Route::group('/', function(){
    //后台登录页面
    Route::rule('login','login/index','GET|POST');
    //后台登入
    Route::rule('loginin','login/loginIn','GET|POST');
    //后台退出登入
    Route::rule('loginout','login/loginOut','GET|POST');
});

// +----------------------------------------------
// |                     注册路由                 |
// +----------------------------------------------
Route::group('/', function(){
});

// +----------------------------------------------
// |                     系统配置路由                 |
// +----------------------------------------------
Route::group('/', function(){
});

// +----------------------------------------------
// |                     后台路由                 |
// +----------------------------------------------
Route::group('/', function(){
    //后台页面
    Route::get('/','index/index');
    //控制台页面
    Route::get('/console','console/index');
    //控制台数据页面
    Route::get('/analyse','console/analyse');
    //菜单
    Route::get('menu','index/menu');
    //欢迎页
    Route::get('home','index/home');
    //修改密码
    Route::rule('pass','index/pass','GET|POST');
    //清理缓存
    Route::post('cache','index/cache');
    //后台图片上传
    Route::post('upload','common/upload');
    Route::rule('test1','test/index');

    //文章管理
    Route::rule('article/index','article/index','GET|POST');//列表
    Route::rule('article/del','article/del');//删除
    Route::rule('article/delAll','article/delAll');//选择删除
    Route::rule('article/add','article/add');//添加
    Route::rule('article/edit','article/edit','GET|POST');//编辑
    Route::rule('article/status','article/status','GET|POST');//是否启用
    Route::rule('article/articleAnalyseKeywords','article/articleAnalyseKeywords','GET|POST');//分析关键词
    Route::rule('article/articleAnalyseTags','article/articleAnalyseTags','GET|POST');//分析文章标签
    Route::rule('article/articleAnalyseAbstarct','article/articleAnalyseAbstarct','GET|POST');//分析文章摘要


    //文章分类
    Route::rule('articlecategory/index','articlecategory/index','GET|POST');
    Route::rule('articlecategory/del','articlecategory/del','GET|POST');//删除
    Route::rule('articlecategory/delAll','articlecategory/delAll','GET|POST');//选择删除
    Route::rule('articlecategory/add','articlecategory/add','GET|POST');//添加
    Route::rule('articlecategory/edit','articlecategory/edit','GET|POST');//编辑
    Route::rule('articlecategory/status','articlecategory/status','GET|POST');//是否启用
    Route::rule('articlecategory/tree','articlecategory/tree','GET|POST');//分类树的json数据


    //标签管理
    Route::get('tags/index','tags/index');//列表
    Route::rule('tags/add','tags/add','GET|POST');//添加
    Route::rule('tags/edit','tags/edit','GET|POST');//编辑
    Route::post('tags/del','tags/del');//删除
    Route::post('tags/status','tags/status');//状态
    Route::post('tags/delall','tags/delall');//选择删除

    //标签分类
    Route::rule('tagscategory/index','tagscategory/index','GET|POST');
    Route::rule('tagscategory/del','tagscategory/del','GET|POST');//删除
    Route::rule('tagscategory/delAll','tagscategory/delAll','GET|POST');//选择删除
    Route::rule('tagscategory/add','tagscategory/add','GET|POST');//添加
    Route::rule('tagscategory/edit','tagscategory/edit','GET|POST');//编辑
    Route::rule('tagscategory/status','tagscategory/status','GET|POST');//是否启用
    Route::rule('tagscategory/tree','tagscategory/tree','GET|POST');//分类树的json数据


    //Link管理
    Route::get('links/index','links/index');//列表
    Route::rule('links/add','links/add','GET|POST');//添加
    Route::rule('links/edit','links/edit','GET|POST');//编辑
    Route::post('links/del','links/del');//删除
    Route::post('links/status','links/status');//状态
    Route::post('links/delall','links/delall');//选择删除
});
//->middleware("AdminCheck")
